package top.continew.admin.req;

import cn.shengchao.examstar.rpc.uddsys.req.DistributeNodeInfoStateReq;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import top.continew.admin.system.util.ValidateGroup;

import java.io.Serializable;

/**
 * @program: examstar-manger-api
 * @description: 创建分销链用户的接口
 * @author: Xiong weiqiang
 * @create: 2025-03-27 11:39
 */
@Data
public class DistributeNodeInfoStateRto implements Serializable {
    private Integer distributeType;
    @NotNull(message = "用户不能为空",groups = {ValidateGroup.ReqGroup.SAVE.class, ValidateGroup.ReqGroup.UPDATE.class})
    private Long userId;
    private Integer enableStatus;



    public static DistributeNodeInfoStateReq buildToReq(DistributeNodeInfoStateRto rto){
        DistributeNodeInfoStateReq req = new DistributeNodeInfoStateReq();
        req.setDistributeType(rto.getDistributeType());
        req.setUserId(rto.getUserId());
        req.setEnableStatus(rto.getEnableStatus());
        return req;
    }
}